package com.ls.config;

import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.log4j.Logger;

public class Config {
	public static Logger logger  = Logger.getLogger(Config.class);
	public static void main(String[] args) {
		try {
			
			//一方面查找文件比价方便，另一方面获取属性比较方便，各种类型的属性
			PropertiesConfiguration config = new PropertiesConfiguration("log4j.properties");
			logger.info(config.getBasePath());
			logger.info(config.getProperty("log4j.rootLogger"));
		} catch (ConfigurationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}  
	}

}
